---
page_title: "cloudflare_spectrum_application Resource - Cloudflare"
subcategory: ""
description: |-
  Provides a Cloudflare Spectrum Application. You can extend the power
  of Cloudflare's DDoS, TLS, and IP Firewall to your other TCP-based
  services.
---

# cloudflare_spectrum_application (Resource)

Provides a Cloudflare Spectrum Application. You can extend the power
of Cloudflare's DDoS, TLS, and IP Firewall to your other TCP-based
services.

## Example Usage

```terraform
resource "cloudflare_spectrum_application" "example" {
  zone_id      = "0da42c8d2132a9ddaf714f9e7c920711"
  protocol     = "tcp/22"
  traffic_type = "direct"

  dns {
    type = "CNAME"
    name = "ssh.example.com"
  }

  origin_direct = [
    "tcp://192.0.2.1:22"
  ]

  edge_ips {
    type = "static"
    ips  = ["203.0.113.1", "203.0.113.2"]
  }
}
```
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `dns` (Block List, Min: 1, Max: 1) The name and type of DNS record for the Spectrum application. (see [below for nested schema](#nestedblock--dns))
- `protocol` (String) The port configuration at Cloudflare's edge. e.g. `tcp/22`.
- `zone_id` (String) The zone identifier to target for the resource.

### Optional

- `argo_smart_routing` (Boolean) Enables Argo Smart Routing.
- `edge_ips` (Block List, Max: 1) The anycast edge IP configuration for the hostname of this application. (see [below for nested schema](#nestedblock--edge_ips))
- `ip_firewall` (Boolean) Enables the IP Firewall for this application.
- `origin_direct` (List of String) A list of destination addresses to the origin. e.g. `tcp://192.0.2.1:22`.
- `origin_dns` (Block List, Max: 1) A destination DNS addresses to the origin. (see [below for nested schema](#nestedblock--origin_dns))
- `origin_port` (Number) Origin port to proxy traffice to. Conflicts with `origin_port_range`.
- `origin_port_range` (Block List, Max: 1) Origin port range to proxy traffice to. When using a range, the protocol field must also specify a range, e.g. `tcp/22-23`. Conflicts with `origin_port`. (see [below for nested schema](#nestedblock--origin_port_range))
- `proxy_protocol` (String) Enables a proxy protocol to the origin. Available values: `off`, `v1`, `v2`, `simple`.
- `tls` (String) TLS configuration option for Cloudflare to connect to your origin. Available values: `off`, `flexible`, `full`, `strict`.
- `traffic_type` (String) Sets application type. Available values: `direct`, `http`, `https`.

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--dns"></a>
### Nested Schema for `dns`

Required:

- `name` (String) The name of the DNS record associated with the application.
- `type` (String) The type of DNS record associated with the application.


<a id="nestedblock--edge_ips"></a>
### Nested Schema for `edge_ips`

Required:

- `type` (String) The type of edge IP configuration specified. Available values: `dynamic`, `static`.

Optional:

- `connectivity` (String) The IP versions supported for inbound connections on Spectrum anycast IPs. Required when `type` is not `static`. Available values: `all`, `ipv4`, `ipv6`.
- `ips` (Set of String) The collection of customer owned IPs to broadcast via anycast for this hostname and application. Requires [Bring Your Own IP](https://developers.cloudflare.com/spectrum/getting-started/byoip/) provisioned.


<a id="nestedblock--origin_dns"></a>
### Nested Schema for `origin_dns`

Required:

- `name` (String) Fully qualified domain name of the origin.


<a id="nestedblock--origin_port_range"></a>
### Nested Schema for `origin_port_range`

Required:

- `end` (Number) Upper bound of the origin port range.
- `start` (Number) Lower bound of the origin port range.

## Import

Import is supported using the following syntax:

```shell
$ terraform import cloudflare_spectrum_application.example <zone_id>/<spectrum_application_id>
```
